package com.ruoyi.know.service.impl;

import com.ruoyi.know.dto.PostTrendDTO;
import com.ruoyi.know.dto.SectionDistributionDTO;
import com.ruoyi.know.dto.UserPointsRankDTO;
import com.ruoyi.know.mapper.StatisticsMapper;
import com.ruoyi.know.service.IStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StatisticsServiceImpl implements IStatisticsService {

    @Autowired
    private StatisticsMapper statisticsMapper;

    @Override
    public List<PostTrendDTO> getPostTrend() {
        return statisticsMapper.selectPostTrend();
    }

    @Override
    public List<SectionDistributionDTO> getSectionDistribution() {
        return statisticsMapper.selectSectionDistribution();
    }

    @Override
    public List<UserPointsRankDTO> getUserPointsRank() {
        return statisticsMapper.selectUserPointsRank();
    }


}
